package com.letoken.platform.repo.sss.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 资产历史交易日志
 * </p>
 *
 * @author 作者
 * @since 2024-09-05
 */
@Getter
@Setter
@TableName("app_user_assets_history")
@ApiModel(value = "AppUserAssetsHistory对象", description = "资产历史交易日志")
public class AppUserHistory extends Model<AppUserHistory> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户编号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("交易类型(0全部/1充值/2提现/3.买入4.卖出5.广告上家冻结6.广告下架解冻7.投资8.见点 9.复投 10.转出 11、转入 12.燃料费 13.投资激活 14.直推奖 15.碰对奖)")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("交易状态(0正在处理/1已完成/2网络确认中/3失败/4异常)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("代币id")
    @TableField("token_id")
    private Integer tokenId;

    @ApiModelProperty("代币名称")
    @TableField("token_currency")
    private String tokenCurrency;

    @ApiModelProperty("数量")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("订单流水号")
    @TableField("sn")
    private String sn;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("变更之后的余额")
    @TableField("balance")
    private BigDecimal balance;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
